package com.dd.cloud.user.mapper.doctor;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dd.cloud.user.entity.doctor.DoctorOrderIncomeDetail;
import com.dd.cloud.user.req.doctor.*;
import com.dd.cloud.user.res.doctor.*;
import com.dd.cloud.common.vo.PageVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author Lx
 * @version 1.0
 */
public interface DoctorOrderIncomeDetailMapper extends BaseMapper<DoctorOrderIncomeDetail> {
    /**
     * 查询医生收入明细 年统计
     *
     * @param req
     * @return
     */
    List<DoctorOrderIncomeDetailListRes> queryDoctorOrderIncomeDetailList(@Param("req") DoctorOrderIncomeDetailListReq req);

    /**
     * 查询医生收入明细 总收入
     *
     * @param req
     * @return
     */
    Long queryDoctorOrderIncomeDetailListTotal(@Param("req") DoctorOrderIncomeDetailListReq req);

    /**
     * 查询医生收入明细 月明细
     *
     * @param pageVo
     * @param req
     * @return
     */
    PageVo<DoctorOrderIncomeDetailMonthListRes> queryDoctorOrderIncomeDetailMonthList(PageVo<?> pageVo, @Param("req") DoctorOrderIncomeDetailMonthListReq req);

    /**
     * 查询医生收入明细 月明细 金额统计
     *
     * @param req
     * @return
     */
    DoctorOrderIncomeDetailExtendRes queryDoctorOrderIncomeDetailMonthTotal(@Param("req") DoctorOrderIncomeDetailMonthListReq req);

    /**
     * 查询医生收入记录 运营后台
     *
     * @param pageVo
     * @param req
     * @return
     */
    PageVo<DoctorOrderIncomeDetailPageSystemRes> queryDoctorOrderIncomeDetailPageSystem(PageVo<?> pageVo, @Param("req") DoctorOrderIncomeDetailPageSystemReq req);

    /**
     * 查询医生提现收入信息
     *
     * @param docId
     * @return
     */
    DoctorWithdrawIncomeInfoRes queryDoctorWithdrawIncomeInfo(@Param("docId") Integer docId);

    /**
     * 查询医生收益
     * @param req
     * @return
     */
    PageVo<DoctorOrderIncomePageRes> queryDoctorIncomePage(@Param("pageVo")PageVo<DoctorOrderIncomePageRes> pageVo,
                                                           @Param("req") DoctorOrderIncomePageReq req);

    /**
     * 医生提现
     * @param req
     * @param pageVo
     * @return
     */
    PageVo<DoctorWithdrawRecordPageSystemRes> queryWithdrawRecordPage(@Param("pageVo") PageVo<DoctorWithdrawRecordPageSystemRes> pageVo,

                                                                      @Param("req") DoctorWithdrawPageReq req);

    /**
     * 统计
     * @param req
     */
    List<DoctorOrderIncomePageRes> queryDoctorIncomeList(@Param("req") DoctorOrderIncomePageReq req);

    /**
     * 查询医生的收益记录列表
     * @param doctorId
     * @return
     */
    List<DoctorOrderIncomeDetail> queryIncomeDetail(@Param("doctorId") Integer doctorId);
}
